import request from '@/config/axios'

// 客户膳食信息 VO
export interface CFoodVO {
  id: number // ID
  customerid: number // 客户ID
  foodid: number // 膳食ID
  fooddate: Date // 膳食日期
  foodweek: number // 膳食星期
}

// 客户膳食信息 API
export const CFoodApi = {
  // 查询客户膳食信息分页
  getCFoodPage: async (params: any) => {
    return await request.get({ url: `/yyzx/C-food/page`, params })
  },

  // 查询客户膳食信息详情
  getCFood: async (id: number) => {
    return await request.get({ url: `/yyzx/C-food/get?id=` + id })
  },

  // 新增客户膳食信息
  createCFood: async (data: CFoodVO) => {
    return await request.post({ url: `/yyzx/C-food/create`, data })
  },

  // 修改客户膳食信息
  updateCFood: async (data: CFoodVO) => {
    return await request.put({ url: `/yyzx/C-food/update`, data })
  },

  // 删除客户膳食信息
  deleteCFood: async (id: number) => {
    return await request.delete({ url: `/yyzx/C-food/delete?id=` + id })
  },

  // 导出客户膳食信息 Excel
  exportCFood: async (params) => {
    return await request.download({ url: `/yyzx/C-food/export-excel`, params })
  },
}